package com.cmccgz.udacs_landlord_webapp.main.user.login;

import android.os.Handler;

import com.cmccgz.baselibrary.base.BasePresenter;
import com.cmccgz.baselibrary.base.BaseView;
import com.cmccgz.udacs_landlord_webapp.bean.LoginInfo;

/**
 * @author: INX
 */

public interface LoginContract {
    /**
     * 登陆presenter
     */
    interface LoginPresenter extends BasePresenter{
        void doLogin(String userNum,String password,int type);
        void getUserHead(String userNum);
        void getCode(String mobile,Handler handler);
        void onDestroy();
    }

    /**
     * 登陆view
     */
    interface LoginView {
        void loginSuccess(LoginInfo loginInfo);
        void loginError(String msg);
        void showUserHead(String url);
        void waitCode(int second);
        void getCodeError(String msg);
        void getCodeSuccess();
        void resetCode();
        boolean isActive();
    }

    /**
     * 忘记密码presenter
     */
    interface ForgetPresenter extends BasePresenter{
        void forgetPwd(String userName,String pwd,String rePwd,String code);
        void getCode(String mobile,Handler handler);
        void onDestroy();
    }

    /**
     * 忘记密码view
     */
    interface ForgetView extends BaseView<ForgetPresenter>{
        void forgetSuccess();
        void forgetError(String msg);
        void waitCode(int second);
        void getCodeError(String msg);
        void getCodeSuccess();
        void resetCode();
    }
}
